package org.hashdb.client.net.bio.send;

import org.hashdb.client.net.bio.MessageType;
import org.hashdb.client.net.bio.get.HeartbeatMessage;
import org.jetbrains.annotations.NotNull;

import java.util.UUID;

/**
 * Date: 2023/12/1 2:55
 *
 * @author huanyuMake-pecdle
 * @version 0.0.1
 */
public class ActHeartbeatMessage extends HeartbeatMessage {

    public ActHeartbeatMessage(@NotNull HeartbeatMessage heartbeatMessage) {
        beat = heartbeatMessage.getBeat();
        id = UUID.randomUUID();
        timestamp = System.currentTimeMillis() + 1000;
    }

    @Override
    public MessageType getType() {
        return MessageType.ACT_HEARTBEAT;
    }
}
